package br.com.sig.cadastro.business.model.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;

import br.com.sig.business.model.entity.BaseEntity;

@Entity
@Table(schema="sig_cadastro", name="atividade_comercial")
public class AtividadeComercial extends BaseEntity {

	private static final long serialVersionUID = -5951123583416787161L;
	
	private String nome;

	@NotNull
	@Column(nullable = false, unique = true)
	public String getNome() {
		return nome;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}
	
	@Transient
	public boolean isOutros() {
		return getNome() != null && getNome().equals("OUTROS");
	}
}